package com.wyj.wuliwuli.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.wyj.wuliwuli.common.CommonValue;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Author wyj
 * @version 1.0
 * @description 系统用户
 */

@Data
@Entity
@Table(name = "wuli_user")
public class WuliUser extends BaseEntity {

    @Column(columnDefinition="varchar(255) COMMENT '头像'")
    private String avatar;

    @Column(columnDefinition="varchar(100) COMMENT '账号'")
    private String username;

    // @JsonIgnore
    @Column(columnDefinition="varchar(255) COMMENT '密码'")
    private String password;

    @JsonIgnore
    @Column(columnDefinition="varchar(255) COMMENT '盐'")
    private String salt;

    /**
     * 性别：0女，1男
     * @see CommonValue.Gender
     */
    private Integer gender;

    @Column(columnDefinition="varchar(100) COMMENT '姓名'")
    private String name;

    @Column(columnDefinition="varchar(255) COMMENT '邮箱'")
    private String email;

    @Column(columnDefinition="varchar(50) COMMENT '电话'")
    private String phone;

    /**
     * @see CommonValue.Role
     */
    @Column(columnDefinition="varchar(255) COMMENT '角色'")
    private String role;

    @Column(columnDefinition="varchar(1000) COMMENT '备注'")
    private String remark;

}
